package com.kejiguan.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;

import com.kejiguan.ui.request.RequestCommonData;

/**
 * Created by apple on 16/4/5.
 */
public class IpSettingActivity extends Activity implements View.OnClickListener{

    private EditText ipInput;
    private ImageView confirmBtn;


    @Override
    public void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(R.layout.activity_ip_setting_layout);

        ipInput= (EditText) findViewById(R.id.ip_input);
        confirmBtn= (ImageView) findViewById(R.id.confirm_btn);
        confirmBtn.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId())
        {
            case R.id.confirm_btn:
                String url=ipInput.getEditableText().toString().trim();
                RequestCommonData.SERVICE_URL=url;
                Intent intent=new Intent(IpSettingActivity.this,LoginActivity.class);
                startActivity(intent);
                finish();
            break;
        }
    }
}
